import router from '@/router'
import axios from 'axios'
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex,axios)

export default new Vuex.Store({

  state: {
    InfoUser:{
      breadcrunmbName:[],
     
    },
    tmemberdynamicinfo:[]
  },
  getters: {
  },
  mutations: {
   
    getUsers(state){
        console.log(JSON.parse(sessionStorage.getItem("user")));
        state.InfoUser=JSON.parse(sessionStorage.getItem("user"));
      },
      getbreadcrunmbName(state,play){
        state.breadcrunmbName=play
      },
      gettmemberdynamicinfo(state,play){
        console.log("提交了veux"+JSON.parse(sessionStorage.getItem("user1")))
        state.tmemberdynamicinfo=JSON.parse(sessionStorage.getItem("user1"))
      }
  },
  actions: {
  
      aEdit(context,payload){
        axios.get("/api/TMemberExaminationByidAll",{params:{id:payload}}).then(data=>{
          sessionStorage.setItem("user1",JSON.stringify(data.data))
          context.commit("gettmemberdynamicinfo")
        })
        
      }
  
  },
  modules: {
  }
  
})
